<template>
  <div id="myjf">
    <div class="myjf">
      <div class="top">
        <div class="left">
          <span>当前积分：</span>
          <span>{{current_jf}}</span>
        </div>
        <div class="right">
          <span @click="toExchange()">前往兑换>></span>
        </div>
      </div>
      <div class="jf_list">
        <span class="jfmx">积分明细</span>
        <div class="list">
          <div class="listTop">
            <span style="margin-left:50px">名称</span>
            <span>积分变动</span>
            <span style="margin-right:30px">时间</span>
          </div>
          <ul>
            <li v-for="(item, index) in jf_list" :key="index">
              <span style="margin-left:20px">{{item.jf_name}}</span>
              <span>{{item.jf_change}}</span>
              <span style="margin-right:30px">{{item.jf_date}}</span>
            </li>
          </ul>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      current_jf: 2000, //当前积分
      jf_list: [
        {
          jf_name: "购买商品-订单编号7845658546521", //积分名称
          jf_change: "+200", //积分变动
          jf_date: "2019-07-10 16:56" //积分时间
        },
        {
            jf_name: "积分商城-商品兑换", //积分名称
          jf_change: "+200", //积分变动
          jf_date: "2019-07-10 16:56" //积分时间
        },
        {
            jf_name: "购买商品-订单编号7845658546521", //积分名称
          jf_change: "+200", //积分变动
          jf_date: "2019-07-10 16:56" //积分时间
        }
      ] //积分列表
    };
  },
  methods: {
    //   前往兑换
      toExchange(){
         this.$router.push({path: "/integralmall"})
      }
  }
};
</script>

<style lang="scss" scoped>
.myjf {
  width: 940px;
  min-height: 480px;
  .top {
    height: 60px;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0px 3px 5px 0px rgba(204, 196, 196, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    .left {
      display: flex;
      align-items: center;
      & span:nth-of-type(1) {
        font-size: 14px;
        font-family: Microsoft YaHei;
        font-weight: 400;
        color: rgba(51, 51, 51, 1);
      }
      & span:nth-of-type(2) {
        font-size: 18px;
        font-family: Microsoft YaHei;
        font-weight: 400;
        color: rgba(254, 44, 74, 1);
      }
    }
    .right {
      font-size: 12px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: rgba(254, 44, 74, 1);
      cursor: pointer;
    }
  }
  .jf_list {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0px 3px 5px 0px rgba(204, 196, 196, 0.15);
    margin-top: 20px;
    min-height: 400px;
    padding: 20px;
    .jfmx {
      font-size: 14px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: rgba(51, 51, 51, 1);
    }
    .list {
      margin-top: 20px;
      background: rgba(255, 255, 255, 1);
      border: 1px solid rgba(230, 230, 230, 1);
      .listTop {
        height: 40px;
        background: rgba(245, 245, 245, 1);
        display: flex;
        align-items: center;
        justify-content: space-between;
        span {
          font-size: 14px;
          font-family: Microsoft YaHei;
          font-weight: 400;
          color: rgba(77, 77, 77, 1);
        }
      }
      ul {
        list-style: none;
        padding: 0;
        margin: 0;
        li {
          height: 42px;
          position: relative;
          display: flex;
          align-items: center;
          border-bottom: 1px solid rgba(230, 230, 230, 1);
          justify-content: space-between;
          span {
            font-size: 14px;
            font-family: Microsoft YaHei;
            font-weight: 400;
            color: rgba(77, 77, 77, 1);
          }
          & span:nth-of-type(2){
              position: absolute;
              left: 440px;
          }
        }
      }
    }
  }
}
</style>